import request from '../index.js';

// 获取绘本的磨耳朵音频
export const listenList=(setId,sort)=>{
	let option=sort ? {setId,sort} :{setId};
	return request.get('/api/user/listen/list',option);
}

// 收藏
export const collect=(bookId,type=true)=>{
	let url= type ? '/api/user/collection/listen/collect' : '/api/user/collection/listen/remove';
	return request.get(url,{bookId});
}

 // 上报磨耳朵播放
 export const play=(bookId)=>{
	return request.get('/api/user/listen/play',{bookId});
 }